package cn.mw.cmdb.template.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author gengjb
 * @description 规则过滤器参数
 * @date 2024/8/7 16:19
 */
@Getter
@Setter
@Schema(name = "DiscoveryRuleParam", description = "发现规则参数")
public class DiscoveryRuleFilterParam {

    @Schema(description = "过滤条件信息")
    private List<FilterCondition> conditions;

    @Schema(description = "过滤条件的评估方法")
    private String evaltype;

    @Schema(description = "生成的表达式")
    private String eval_formula;

    @Schema(description = "自定义表达式")
    private String formula;




    @Getter
    @Setter
    @Schema(name = "FilterCondition", description = "过滤条件")
    public class FilterCondition{
        @Schema(description = "宏信息")
        private String macro;
        @Schema(description = "比较的值")
        private String value;
        @Schema(description = "自定义表达式引用的ID")
        private String formulaid;
        @Schema(description = "条件运算符")
        private String operator;
    }
}
